Rate limit on the transitions of zones to open

ABSTRACT

The present disclosure generally relates to methods of operating storage devices. The storage device comprises a controller comprising first random access memory (RAM1), second random access memory (RAM2), and a storage unit divided into a plurality of zones. The controller restricts the host to a maximum number of zones that can be in the open and active state at a time. Open zones can be switched to the closed state, and vice versa, upon a predetermined amount of time expiring. The maximum number of open zones is based on one or more amounts of time to: generate parity data, copy the parity data from the RAM2 to the RAM1, update the parity data, switch a zone from the open and active state to the closed state, and the amount of space in a temporary RAM1 buffer.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

Embodiments of the present disclosure generally relate to storagedevices, such as solid state drives (SSDs).

Description of the Related Art

Storage devices, such as SSDs, may be used in computers in applicationswhere relatively low latency and high capacity storage are desired. Forexample, SSDs may exhibit lower latency, particularly for random readsand writes, than hard disk drives (HDDs). Typically, a controller of theSSD receives a command to read or write data from a host device to amemory device. The data is read and written to one or more erase blocksin the memory device. Each of the erase blocks is associated with alogical block address so that the SSD and/or the host device know thelocation of where the data is stored. One or more erase blocks may begrouped together by their respective logical block addresses to form aplurality of zones.

As a command is received by the storage device to write data to aparticular zone, the data associated with the command is written to thememory device and parity data is simultaneously generated for the datain order to protect the data. The parity data is then stored in volatilememory within the storage device. However, the storage device generallycomprises a very limited amount of volatile memory, such as SRAM andDRAM, as volatile memory is expensive. Since multiple zones may be openat the same time, the data being written to the volatile memory takes upa lot of valuable volatile memory space, which may reduce the amount ofvolatile memory available for other data, or may require a greateramount of volatile memory to be included in the storage device.Moreover, transferring data between the various volatile memories maytake a long period of time, causing write delays for the storage device.

Therefore, what is needed is a new method of generating and storing datain a storage device.

SUMMARY OF THE DISCLOSURE

The present disclosure generally relates to methods of operating storagedevices. The storage device comprises a controller comprising firstrandom access memory (RAM1), second random access memory (RAM2), and astorage unit divided into a plurality of zones. The controller restrictsthe host to a maximum number of zones that can be in the open and activestate at a time. Open zones can be switched to the closed state, andvice versa, upon a predetermined amount of time expiring. The maximumnumber of open zones is based on one or more amounts of time to:generate parity data, copy the parity data from the RAM2 to the RAM1update the parity data, switch a zone from the open and active state tothe closed state, and the amount of space in a temporary RAM1 buffer.

In one embodiment, a storage device comprises a non-volatile storageunit, wherein the capacity of the non-volatile storage unit is dividedinto a plurality of zones. The non-volatile storage unit comprises aplurality of dies and each of the plurality of dies comprising aplurality of erase blocks. The storage device further comprises a firstvolatile memory unit and a controller coupled to the non-volatilestorage unit and the first volatile memory unit. The controllercomprises a second volatile memory unit, wherein the controller isconfigured to set a maximum number of open and active zones and receiveone or more first commands to write data to one or more open and activezones of the plurality of zones. The controller is further configured toreceive one or more second commands to write data to a first zone,wherein the first zone is in a closed or resource conserved lowerperformance internal state, change a least recently used open and activezone to the closed or resource conserved lower performance internalstate, and change the first zone to open and active state.

In another embodiment, a storage device comprises a non-volatile storageunit, wherein the capacity of the non-volatile storage unit is dividedinto a plurality of zones. The non-volatile storage unit comprises aplurality of dies and each of the plurality of dies comprising aplurality of erase blocks. The storage device further comprises a firstvolatile memory unit and a controller coupled to the non-volatilestorage unit and the first volatile memory unit. The controllercomprises a second volatile memory unit, wherein the controller isconfigured to set a maximum number of open and active zones, receive oneor more commands to write data to one or more open and active zones ofthe plurality of zones, and generate new first parity data for a firstopen and active zone in a temporary location of one or more temporarylocations in the second volatile memory unit. The controller is furtherconfigured to copy previous first parity data for the first open andactive zone from the first volatile memory unit to a first location inthe second volatile memory unit. The controller is also configured toupdate the previous first parity data with the new first parity data inthe second volatile memory unit, wherein an amount of time thegenerating the new first parity data, copying the previous first paritydata, and updating the previous first parity data takes determines themaximum number of open and active zones.

In another embodiment, a storage device comprises a non-volatile storageunit, wherein the capacity of the non-volatile storage unit is dividedinto a plurality of zones. The non-volatile storage unit comprises aplurality of dies and each of the plurality of dies comprising aplurality of erase blocks. The storage device further comprises a firstvolatile memory unit and a controller coupled to the non-volatilestorage unit and the first volatile memory unit. The controllercomprises a second volatile memory unit, wherein the second volatilememory comprises one or more temporary locations. The controller isconfigured to set a maximum number of open and active zones, wherein themaximum number of open and active zones is determined based on a numberof temporary locations in the second volatile memory and receive one ormore first commands to write data to one or more open and active zonesof the plurality of zones. The controller is further configured togenerate new first parity data for a first open and active in a firsttemporary location in the second volatile memory unit, change a secondopen and active zone to a closed or resource conserved lower performanceinternal state upon receiving one or more second commands to write datato a closed zone, and change the closed zone to an open and activestate.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentdisclosure can be understood in detail, a more particular description ofthe disclosure, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this disclosure and are therefore not to beconsidered limiting of its scope, for the disclosure may admit to otherequally effective embodiments.

FIG. 1 is a schematic block diagram illustrating a storage system,according to one embodiment.

FIG. 2A illustrates a zoned namespace utilized in a storage device,according to one embodiment.

FIG. 2B illustrates a state diagram for the zoned namespaces of thestorage device of FIG. 2A, according to one embodiment.

FIGS. 3A-3D illustrate a schematic block diagram of generating and/orupdating data corresponding to various zones in the volatile memory,according to various embodiments.

FIG. 4 illustrates a schematic diagram of updating data in flight overtime in the storage device, according to various embodiments.

To facilitate understanding, identical reference numerals have beenused, where possible, to designate identical elements that are common tothe figures. It is contemplated that elements disclosed in oneembodiment may be beneficially utilized on other embodiments withoutspecific recitation.

DETAILED DESCRIPTION

In the following, reference is made to embodiments of the disclosure.However, it should be understood that the disclosure is not limited tospecific described embodiments. Instead, any combination of thefollowing features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thedisclosure. Furthermore, although embodiments of the disclosure mayachieve advantages over other possible solutions and/or over the priorart, whether or not a particular advantage is achieved by a givenembodiment is not limiting of the disclosure. Thus, the followingaspects, features, embodiments and advantages are merely illustrativeand are not considered elements or limitations of the appended claimsexcept where explicitly recited in a claim(s). Likewise, reference to“the disclosure” shall not be construed as a generalization of anyinventive subject matter disclosed herein and shall not be considered tobe an element or limitation of the appended claims except whereexplicitly recited in a claim(s).

The present disclosure generally relates to methods of operating storagedevices. The storage device comprises a controller comprising firstrandom access memory (RAM1), second random access memory (RAM2), and astorage unit divided into a plurality of zones. The controller restrictsthe host to a maximum number of zones that can be in the open and activestate at a time. Open zones can be switched to the closed state, andvice versa, upon a predetermined amount of time expiring. The maximumnumber of open zones is based on one or more amounts of time to:generate parity data, copy the parity data from the RAM2 to the RAM1,update the parity data, switch a zone from the open and active state tothe closed state, and the amount of space in a temporary RAM1 buffer.

FIG. 1 is a schematic block diagram illustrating a storage system 100 inwhich storage device 106 may function as a storage device for a hostdevice 104, in accordance with one or more techniques of thisdisclosure. For instance, the host device 104 may utilize a storage unit110, such as non-volatile memory, included in storage device 106 tostore and retrieve data. The storage unit 110 may be any type ofnon-volatile memory, such as MRAM, NAND, NOR, or HDD, for example. Inthe following descriptions, the storage unit 110 is referenced as anon-volatile memory (NVM) 110 for simplification and exemplary purposes.The host device 104 comprises a host DRAM 138. In some examples, thestorage system 100 may include a plurality of storage devices, such asthe storage device 106, which may operate as a storage array. Forinstance, the storage system 100 may include a plurality of storagedevices 106 configured as a redundant array of inexpensive/independentdisks (RAID) that collectively function as a mass storage device for thehost device 104.

The storage system 100 includes a host device 104 which may store and/orretrieve data to and/or from one or more storage devices, such as thestorage device 106. As illustrated in FIG. 1, the host device 104 maycommunicate with the storage device 106 via an interface 114. The hostdevice 104 may comprise any of a wide range of devices, includingcomputer servers, network attached storage (NAS) units, desktopcomputers, notebook (i.e., laptop) computers, tablet computers, set-topboxes, telephone handsets such as so-called “smart” phones, so-called“smart” pads, televisions, cameras, display devices, digital mediaplayers, video gaming consoles, video streaming device, and the like.

The storage device 106 includes a controller 108, NVM 110, a powersupply 111, a first random-access memory (RAM) or volatile memory 112,such as a dynamic random-access memory (DRAM), and an interface 114. Thecontroller 108 may comprise a parity engine or a XOR engine 124 and asecond RAM or volatile memory 118, such as a static random-access memory(SRAM). The XOR engine 124 is a type of parity engine and is called outas a XOR engine for exemplary purposes. However, the XOR engine 124 mayinclude other embodiments that the parity engine comprises. In thefollowing descriptions, a first RAM or volatile memory 112 is referencedto as DRAM and a second RAM or volatile memory 118 is referenced as SRAMfor simplification and exemplary purposes. In some examples, the storagedevice 106 may include additional components not shown in FIG. 1 forsake of clarity. For example, the storage device 106 may include aprinted circuit board (PCB) to which components of the storage device106 are mechanically attached and which includes electrically conductivetraces that electrically interconnect components of the storage device106, or the like. In some examples, the physical dimensions andconnector configurations of the storage device 106 may conform to one ormore standard form factors. Some example standard form factors include,but are not limited to, 2.5″ data storage device (e.g., an HDD or SSD),2.5″ data storage device, 1.8″ data storage device, peripheral componentinterconnect (PCI), PCI-extended (PCI-X), PCI Express (PCIe) (e.g., PCIe×1, ×4, ×8, ×16, PCIe Mini Card, MiniPCI, etc.). In some examples, thestorage device 106 may be directly coupled (e.g., directly soldered) toa motherboard of the host device 104.

The interface 114 of the storage device 106 may include one or both of adata bus for exchanging data with the host device 104 and a control busfor exchanging commands with the host device 104. The interface 114 mayoperate in accordance with any suitable protocol. For example, theinterface 114 may operate in accordance with one or more of thefollowing protocols: advanced technology attachment (ATA) (e.g.,serial-ATA (SATA) and parallel-ATA (PATA)), Fibre Channel Protocol(FCP), small computer system interface (SCSI), serially attached SCSI(SAS), PCI, PCIe, non-volatile memory express (NVMe), OpenCAPI, GenZ,Cache Coherent Interface Accelerator (CCIX), Compute Express Link (CXL),Open Channel SSD (OCSSD), or the like. The electrical connection of theinterface 114 (e.g., the data bus, the control bus, or both) iselectrically connected to the controller 108, providing electricalconnection between the host device 104 and the controller 108, allowingdata to be exchanged between the host device 104 and the controller 108.In some examples, the electrical connection of the interface 114 mayalso permit the storage device 106 to receive power from the host device104. For example, as illustrated in FIG. 1, the power supply 111 mayreceive power from the host device 104 via the interface 114.

The storage device 106 includes NVM 110, which may include a pluralityof memory devices or memory units. NVM 110 may be configured to storeand/or retrieve data. For instance, a memory unit of NVM 110 may receivedata and a message from the controller 108 that instructs the memoryunit to store the data. Similarly, the memory unit of NVM 110 mayreceive a message from the controller 108 that instructs the memory unitto retrieve data. In some examples, each of the memory units may bereferred to as a die. In some examples, a single physical chip mayinclude a plurality of dies (i.e., a plurality of memory units). In someexamples, each memory unit may be configured to store relatively largeamounts of data (e.g., 128 MB, 256 MB, 512 MB, 1 GB, 2 GB, 4 GB, 8 GB,16 GB, 32 GB, 64 GB, 128 GB, 256 GB, 512 GB, 1 TB, etc.).

In some examples, each memory unit of NVM 110 may include any type ofnon-volatile memory devices, such as flash memory devices, phase-changememory (PCM) devices, resistive random-access memory (ReRAM) devices,magnetoresistive random-access memory (MRAM) devices, ferroelectricrandom-access memory (F-RAM), holographic memory devices, and any othertype of non-volatile memory devices.

The NVM 110 may comprise a plurality of flash memory devices or memoryunits. Flash memory devices may include NAND or NOR based flash memorydevices, and may store data based on a charge contained in a floatinggate of a transistor for each flash memory cell. In NAND flash memorydevices, the flash memory device may be divided into a plurality ofblocks which may be divided into a plurality of pages. Each block of theplurality of blocks within a particular memory device may include aplurality of NAND cells. Rows of NAND cells may be electricallyconnected using a word line to define a page of a plurality of pages.Respective cells in each of the plurality of pages may be electricallyconnected to respective bit lines. Furthermore, NAND flash memorydevices may be 2D or 3D devices, and may be single level cell (SLC),multi-level cell (MLC), triple level cell (TLC), or quad level cell(QLC). The controller 108 may write data to and read data from NANDflash memory devices at the page level and erase data from NAND flashmemory devices at the block level.

A portion of the NVM 110 may be formatted into logical blocks such thata capacity of the NVM 110 is divided into a plurality of zones. Each ofthe zones comprise a plurality of physical or erase blocks of the NVM110, and each of the erase blocks are associated a plurality of logicalblocks. Each of the logical blocks is associated with a unique LBA orsector. Each of the zones may have a size aligned to the capacity of oneor more erase blocks of the NVM 110. When the controller 108 receives acommand, such as from a host device 104, the controller 108 can readdata from and write data to the plurality of logical blocks associatedwith the plurality of erase blocks of the NVM 110.

The storage device 106 includes a power supply 111, which may providepower to one or more components of the storage device 106. Whenoperating in a standard mode, the power supply 111 may provide power tothe one or more components using power provided by an external device,such as the host device 104. For instance, the power supply 111 mayprovide power to the one or more components using power received fromthe host device 104 via the interface 114. In some examples, the powersupply 111 may include one or more power storage components configuredto provide power to the one or more components when operating in ashutdown mode, such as where power ceases to be received from theexternal device. In this way, the power supply 111 may function as anonboard backup power source. Some examples of the one or more powerstorage components include, but are not limited to, capacitors, supercapacitors, batteries, and the like. In some examples, the amount ofpower that may be stored by the one or more power storage components maybe a function of the cost and/or the size (e.g., area/volume) of the oneor more power storage components. In other words, as the amount of powerstored by the one or more power storage components increases, the costand/or the size of the one or more power storage components alsoincreases.

The storage device 106 also includes volatile memory 112, which may beused by controller 108 to store information. Volatile memory 112 may becomprised of one or more volatile memory devices. In some examples, thecontroller 108 may use volatile memory 112 as a cache. For instance, thecontroller 108 may store cached information in volatile memory 112 untilcached information is written to non-volatile memory 110. As illustratedin FIG. 1, volatile memory 112 may consume power received from the powersupply 111. Examples of volatile memory 112 include, but are not limitedto, RAM, DRAM, SRAM, and synchronous dynamic RAM (SDRAM (e.g., DDR1,DDR2, DDR3, DDR3L, LPDDR3, DDR4, LPDDR4, DDR5, LPDDR5, and the like)).As illustrated in FIG. 1, volatile memory may consume power receivedfrom the power supply 111.

The various types of volatile memories may be used with different accessproperties. For example, DRAM 112 may be arranged for longer burstaccesses to allow for improved bandwidth (BW) of the same access bus.Alternatively, DRAM 112 may be used with smaller accesses such thatrandom small accesses may have better latency. The controller 108comprises additional optional SRAM and/or embedded MRAM 126. EmbeddedMRAM 126 is another alternative memory that may be used in anotherembodiment. Similarly, the access to the MRAM 126 can be optimized fordifferent design purposes, but the quantity of embedded MRAM 126 in theSSD controller 108 may be cost sensitive. Therefore, the choice of howmuch data and which data goes into the premium non-volatile memory andpremium volatile memory will subject to system tradeoffs.

The storage device 106 includes a controller 108, which may manage oneor more operations of the storage device 106. For instance, thecontroller 108 may manage the reading of data from and/or the writing ofdata to the NVM 110 via a toggle mode (TM) bus 128. In some embodiments,when the storage device 106 receives a write command from the hostdevice 104, the controller 108 may initiate a data storage command tostore data to the NVM 110 and monitor the progress of the data storagecommand. The controller 108 may determine at least one operationalcharacteristic of the storage system 100 and store the at least oneoperational characteristic to the NVM 110. In some embodiments, when thestorage device 106 receives a write command from the host device 104,the controller 108 temporarily stores the data associated with the writecommand in the internal memory or buffer (not shown) before sending thedata to the NVM 110.

The controller 108 may include a XOR engine 124 with logic and/orfeatures to generate XOR parity information. Exclusive OR (XOR) parityinformation may be used to improve reliability of storage device 106,such as enabling data recovery of failed writes or failed reads of datato and from NVM or enabling data recovery in case of power loss. Thereliability may be provided by using XOR parity information generated orcomputed based on data stored to storage device 106. Data may passthrough the XOR engine 124 to be written to the NVM 110. The XOR engine124 may generate a parity stream to be written to the SRAM 118. The SRAM118 and the DRAM 112 may each contain a plurality of regions which datamay be written to. Data associated with a zone may be copied from anSRAM region 122 a-122 n in the SRAM 118 to a DRAM region 116 a-116 n inthe DRAM 112, and vice-versa.

The SRAM 118 and the DRAM 112 each individually comprises one or moredies. Each of the one or more dies comprises one or more ranks which iscomprised of one or more banks. The banks are composed of rows andpages. The SRAM 118 in the controller 108 may be logically or physicalseparated into different SRAM areas or regions 122 a-122 n for use bythe controller 108. Similarly, the DRAM 112 may be logically or physicalseparated into different DRAM areas or regions 116 a-116 n for use bythe controller 108. The MRAM inside of the controller 108 may belogically or physical separated into different MRAM areas or regions(not shown). External attachments of MRAM often have a vendor specificstructure and access not covered here.

FIG. 2A illustrates a Zoned Namespaces (ZNS) 202 view utilized in astorage device 200, according to one embodiment. The storage device 200may present the ZNS 202 view to a host device. FIG. 2B illustrates astate diagram 250 for the ZNS 202 of the storage device 200, accordingto one embodiment. The storage device 200 may be the storage device 106of the storage system 100 of FIG. 1. The storage device 200 may have oneor more ZNS 202, and each ZNS 202 may be different sizes. The storagedevice 200 may further comprise one or more conventional namespaces inaddition to the one or more Zoned Namespaces 202. Moreover, the ZNS 202may be a zoned block command (ZBC) for SAS and/or a zoned-device ATAcommand set (ZAC) for SATA. Host side zone activity may be more directlyrelated to media activity in zoned drives due to the relationship oflogical to physical activity possible.

In the storage device 200, the ZNS 202 is the quantity of NVM that canbe formatted into logical blocks such that the capacity is divided intoa plurality of zones 206 a-206 n (collectively referred to as zones206). The NVM may be the storage unit or NVM 110 of FIG. 1. Each of thezones 206 comprise a plurality of physical or erase blocks (not shown)of a memory unit or NVM 204, and each of the erase blocks are associateda plurality of logical blocks (not shown). Each of the zones 206 mayhave a size aligned to the capacity of one or more erase blocks of a NVMor NAND device. When the controller 208 receives a command, such as froma host device (not shown) or the submission queue of a host device, thecontroller 208 can read data from and write data to the plurality oflogical blocks associated with the plurality of erase blocks (EBs) ofthe ZNS 202. Each of the logical blocks is associated with a unique LBAor sector.

In one embodiment, the NVM 204 is a NAND device. The NAND devicecomprises one or more dies. Each of the one or more dies comprises oneor more planes. Each of the one or more planes comprises one or moreerase blocks. Each of the one or more erase blocks comprises one or morewordlines (e.g., 256 wordlines). Each of the one or more wordlines maybe addressed in one or more pages. For example, an MLC NAND die may useupper page and lower page to reach the two bits in each cell of the fullwordline (e.g., 16 KiB per page). Furthermore, each page can be accessedat a granularity equal to or smaller than the full page. A controllercan frequently access NAND in user data granularity logical blockaddress (LBA) sizes of 512 bytes. Thus, as referred to in the belowdescription, NAND locations are equal to a granularity of 512 bytes. Assuch, an LBA size of 512 bytes and a page size of 16 KiB for two pagesof an MLC NAND results in 32 LBAs per wordline. However, the NANDlocation size is not intended to be limiting, and is merely used as anexample.

When data is written to an erase block, one or more logical blocks arecorrespondingly updated within a zone 206 to track where the data islocated within the NVM 204. Data may be written to one zone 206 at atime until a zone 206 is full, or to multiple zones 206 such thatmultiple zones 206 may be partially full. Similarly, when writing datato a particular zone 206, data may be written to the plurality of eraseblocks one block at a time, in sequential order of NAND locations,page-by-page, or wordline-by-wordline, until moving to an adjacent block(i.e., write to a first erase block until the first erase block is fullbefore moving to the second erase block), or to multiple blocks at once,in sequential order of NAND locations, page-by-page, orwordline-by-wordline, to partially fill each block in a parallel fashion(i.e., writing the first NAND location or page of each erase blockbefore writing to the second NAND location or page of each erase block).This sequential programming of every NAND location is a typicalnon-limiting requirement of many NAND EBs.

When a controller 208 selects the erase blocks that will store the datafor each zone, the controller 208 will be able to choose the eraseblocks either at the zone open time, or it may choose the erase blocksas it reaches a need to fill the first wordline of that particular eraseblock. This may be more differentiating when the above described methodof filling one erase block completely prior to starting the next eraseblock is utilized. The controller 208 may use the time difference toselect a more optimal erase block in a just-in-time basis. The decisionof which erase block is allocated and assigned for each zone and itscontiguous LBAs can be occurring for zero or more concurrent zones atall times within the controller 208.

Each of the zones 206 is associated with a zone starting logical blockaddress (ZSLBA) or zone starting sector. The ZSLBA is the firstavailable LBA in the zone 206. For example, the first zone 206 a isassociated with Z_(a)SLBA, the second zone 206 b is associated withZ_(b)SLBA, the third zone 206 c is associated with Z_(c)SLBA, the fourthzone 206 d is associated with Z_(d)SLBA, and the n^(th) zone 206 n(i.e., the last zone) is associated with Z_(n)SLBA. Each zone 206 isidentified by its ZSLBA, and is configured to receive sequential writes(i.e., writing data to the NVM 110 in the order the write commands arereceived).

As data is written to a zone 206, a write pointer 210 is advanced orupdated to point to or to indicate the next available block in the zone206 to write data to in order to track the next write starting point(i.e., the completion point of the prior write equals the starting pointof a subsequent write). Thus, the write pointer 210 indicates where thesubsequent write to the zone 206 will begin. Subsequent write commandsare ‘zone append’ commands, where the data associated with thesubsequent write command appends to the zone 206 at the location thewrite pointer 210 is indicating as the next starting point. An orderedlist of LBAs within the zone 206 may be stored for write ordering. Eachzone 206 may have its own write pointer 210. Thus, when a write commandis received, a zone is identified by its ZSLBA, and the write pointer210 determines where the write of the data begins within the identifiedzone.

FIG. 2B illustrates a state diagram 250 for the ZNS 202 of FIG. 2A. Inthe state diagram 250, each zone may be in a different state, such asempty, active, full, or offline. When a zone is empty, the zone is freeof data (i.e., none of the erase blocks in the zone are currentlystoring data) and the write pointer is at the ZSLBA (i.e., WP=0). Anempty zone switches to an open and active zone once a write is scheduledto the zone or if the zone open command is issued by the host. Zonemanagement (ZM) commands can be used to move a zone between zone openand zone closed states, which are both active states. If a zone isactive, the zone comprises open blocks that may be written to, and thehost may be provided a description of recommended time in the activestate. The controller 208 comprises the ZM. Zone metadata may be storedin the ZM and/or the controller 208.

The term “written to” includes programming user data on 0 or more NANDlocations in an erase block and/or partially filled NAND locations in anerase block when user data has not filled all of the available NANDlocations. The term “written to” may further include moving a zone tofull due to internal drive handling needs (open block data retentionconcerns because the bits in error accumulate more quickly on open eraseblocks), the storage device 200 closing or filling a zone due toresource constraints, like too many open zones to track or discovereddefect state, among others, or a host device closing the zone forconcerns such as there being no more data to send the drive, computershutdown, error handling on the host, limited host resources fortracking, among others.

The active zones may be either open or closed. An open zone is an emptyor partially full zone that is ready to be written to and has resourcescurrently allocated. The data received from the host device with a writecommand or zone append command may be programmed to an open erase blockthat is not currently filled with prior data. A closed zone is an emptyor partially full zone that is not currently receiving writes from thehost in an ongoing basis. The closed state of a zone is a resourceconserved lower performance internal state. The movement of a zone froman open state to a closed state allows the controller 308 to reallocateresources to other tasks. These tasks may include, but are not limitedto, other zones that are open, other conventional non-zone regions, orother controller needs.

In both the open and closed zones, the write pointer is pointing to aplace in the zone somewhere between the ZSLBA and the end of the lastLBA of the zone (i.e., WP>0). Active zones may switch between the openand closed states per designation by the ZM, or if a write is scheduledto the zone. Additionally, the ZM may reset an active zone to clear orerase the data stored in the zone such that the zone switches back to anempty zone. Once an active zone is full, the zone switches to the fullstate. A full zone is one that is completely filled with data, and hasno more available sectors or LBAs to write data to (i.e., WP=zonecapacity (ZCAP)). In a full zone, the write pointer points to the end ofthe writeable capacity of the zone. Read commands of data stored in fullzones may still be executed.

The zones may have any total capacity, such as 256 MiB or 512 MiB.However, a small portion of each zone may be inaccessible to write datato, but may still be read, such as a portion of each zone storing theparity data and one or more excluded erase blocks. For example, if thetotal capacity of a zone 206 is 512 MiB, the ZCAP may be 470 MiB, whichis the capacity available to write data to, while 42 MiB are unavailableto write data. The writeable capacity (ZCAP) of a zone is equal to orless than the total zone storage capacity. The storage device 200 maydetermine the ZCAP of each zone upon zone reset. For example, thecontroller 208 or the ZM may determine the ZCAP of each zone. Thestorage device 200 may determine the ZCAP of a zone when the zone isreset.

The ZM may reset a full zone, scheduling an erasure of the data storedin the zone such that the zone switches back to an empty zone. When afull zone is reset, the zone may not be immediately cleared of data,though the zone may be marked as an empty zone ready to be written to.However, the reset zone must be erased prior to switching to an open andactive zone. A zone may be erased any time between a ZM reset and a ZMopen. Upon resetting a zone, the storage device 200 may determine a newZCAP of the reset zone and update the Writeable ZCAP attribute in thezone metadata. An offline zone is a zone that is unavailable to writedata to. An offline zone may be in the full state, the empty state, orin a partially full state without being active.

Since resetting a zone clears or schedules an erasure of all data storedin the zone, the need for garbage collection of individual erase blocksis eliminated, improving the overall garbage collection process of thestorage device 200. The storage device 200 may mark one or more eraseblocks for erasure. When a new zone is going to be formed and thestorage device 200 anticipates a ZM open, the one or more erase blocksmarked for erasure may then be erased. The storage device 200 mayfurther decide and create the physical backing of the zone upon erase ofthe erase blocks. Thus, once the new zone is opened and erase blocks arebeing selected to form the zone, the erase blocks will have been erased.Moreover, each time a zone is reset, a new order for the LBAs and thewrite pointer 210 for the zone 206 may be selected, enabling the zone206 to be tolerant to receive commands out of sequential order. Thewrite pointer 210 may optionally be turned off such that a command maybe written to whatever starting LBA is indicated for the command.

Referring back to FIG. 2A, when the host sends a write command to writedata to a zone 206, the controller 208 pulls-in the write command andidentifies the write command as a write to a newly opened zone 206. Thecontroller 208 selects a set of EBs to store the data associated withthe write commands of the newly opened zone 206 to, and the newly openedzone 206 switches to an active zone 206. The write command may be acommand to write new data, or a command to move valid data to anotherzone for garbage collection purposes. The controller 208 is configuredto DMA read new commands from a submission queue populated by a hostdevice.

In an empty zone 206 just switched to an active zone 206, the data isassigned to the zone 206 and the associated set of sequential LBAs ofthe zone 206 starting at the ZSLBA, as the write pointer 210 isindicating the logical block associated with the ZSLBA as the firstavailable logical block. The data may be written to one or more eraseblocks or NAND locations that have been allocated for the physicallocation of the zone 206. After the data associated with the writecommand has been written to the zone 206, a write pointer 210 is updatedto point to the next LBA available for a host write (i.e., thecompletion point of the first write). The write data from this hostwrite command is programmed sequentially into the next available NANDlocation in the erase block selected for physical backing of the zone.

For example, the controller 208 may receive a first write command to athird zone 206 c, or a first zone append command. The host identifiessequentially which logical block of the zone 206 to write the dataassociated with the first command to. The data associated with the firstcommand is then written to the first or next available LBA(s) in thethird zone 206 c as indicated by the write pointer 210, and the writepointer 210 is advanced or updated to point to the next available LBAavailable for a host write (i.e., WP>0). If the controller 208 receivesa second write command to the third zone 206 c, or a second zone appendcommand, the data associated with the second write command is written tothe next available LBA(s) in the third zone 206 c identified by thewrite pointer 210. Once the data associated with the second command iswritten to the third zone 206 c, the write pointer 210 once againadvances or updates to point to the next available LBA available for ahost write. Resetting the third zone 206 c moves the write pointer 210back to the Z_(c)SLBA (i.e., WP=0), and the third zone 206 c switches toan empty zone.

FIGS. 3A-3D illustrate a schematic block diagram of generating and/orupdating data corresponding to various zones in the volatile memory,according to various embodiments. Aspects of the system 100 of FIG. 1will be used in accordance with FIG. 3A-3D. In the followingdescriptions, a non-volatile storage unit 110 is referred to as a NVM, afirst RAM or volatile memory 112 (i.e., a first RAM1) is referred to asDRAM, and a second RAM or volatile memory 118 (i.e., a second RAM2) isreferred to as SRAM for simplification and exemplary purposes.

The data storage device 300 may be the storage device 106 described inFIG. 1 of the storage device 200 of FIG. 2A, and the non-volatile memory(NVM) 306 may be the non-volatile memory 110 described in system 100 ofFIG. 1. Terminology such as NAND may be utilized throughout to describethe non-volatile memory 110. Such terminology is not meant to belimiting, but to provide an example of a possible embodiment of thereference. The controller 302 may be the controller 108 described insystem 100 of FIG. 1, the XOR engine 304 may be the XOR engine 124described in system 100 of FIG. 1, the SRAM 308 may be the SRAM 118described in system 100 of FIG. 1, and the DRAM 312 may be the DRAM 112of FIG. 1.

The phrase “parity data” is utilized throughout as an example of data inflight, and is not intended to be limiting, as other forms of data inflight may be relevant. In other words, the parity data discussed in theexamples below is data in flight and may include unwritten host data.Unwritten user or host data may comprise small lengths or amount of data(e.g., less than the size of one or more wordlines) that are stored in aparking location or buffer, such as the SRAM region 310 m, until theaggregated size of the data reaches a minimum size (e.g., the size ofone or more wordlines), in which case the unwritten user data is writtento the NVM 110.

The parity data, deemed as data in flight, is considered the paritybuffer and may protect the loss of data due to data corruption,erroneous bit transfer, power loss, and other causes of data loss. Theparity data may be generated or updated in the SRAM, and temporarilystored in the SRAM 308 and/or DRAM 312 before being copied to the NVM306, for example. Furthermore, in case of power failure, capacitors (notshown) located within the storage device, such as the storage device 300of FIG. 1, may store an adequate amount of energy to program data fromthe DRAM 312 to the NVM 306 to help prevent data loss, for example.

In FIGS. 3A-3D, zones are denoted by “Wxx” where “x” represents a zoneID. The use of “Wxx” to define a zone ID in a SRAM region 310 a-310 nsignifies that a controller 302 has received a write command to writedata to a zone and will update parity data for the corresponding zone.However, the use of “Wxx” to define a zone ID in a DRAM region 314 a-314n signifies that the parity data has been successfully updated in a SRAMregion 310 a-310 n and written from the relevant SRAM region 310 a-310 nto a DRAM region 314 a-314 n. A SRAM region 310 a-310 n and a DRAMregion 314 a-314 n may by any suitable size related to a zone, asdescribed above.

Furthermore, in the embodiments discussed below, the SRAM 308 maycomprise some amount of space dedicated as a temporary buffer or“scratch pad” for the parity data of a zone associated with a writecommand. The temporary buffer may comprise about one SRAM region 310 nto about five SRAM regions 310 n−4-310 n, or more than five SRAM regions310 n−4-310 n in some embodiments. Data stored in a temporary SRAMregion 310 n−4-310 n may be stored for short periods of time. The SRAM308 further comprises a plurality of non-temporary SRAM regions 310a-310 f where data may be stored for long periods of time. The listednumber of SRAM regions 310 a-310 n, both temporary and non-temporary, isnot intended to be limiting, but to provide examples of possibleembodiments.

Parity data for zones may be further denoted by an asterisk (*) or asingle quotation or prime park (′). An asterisk (*) signifies that thenew parity data for a zone has been programmed from the XOR engine 304to the temporary buffer in the SRAM 118, but has not yet updated a SRAMregion 310 a-310 n storing related parity data for the zone copied froma DRAM region 314 a-314 n. A single quotation or prime mark (′) refersto a zone comprising an updated parity data associated with a writecommand to the temporary buffer of the SRAM 308.

The data storage device 300 may restrict or limit the host, such as thehost device 104 of FIG. 1, to a maximum number of concurrent zones inthe open and active state. For example, the maximum number of zones inthe open active state may be restricted to about 128 zones to about 1024zones. An active zone refers to a zone that is available for data to bewritten to or copied from as discussed in the FIG. 2B. An open statedescribes a zone that is receiving write commands, whereas a closedstate or a resource conserved lower performance internal state describesa zone that is not currently receiving write commands. The closed stateof a zone is a resource conserved lower performance internal state.

After a predetermined amount of time has expired since last switchingthe state of a zone, such as about 0.5 seconds to about 1 second, 1second to about 5 seconds, or about 0.5 seconds to about 5 seconds, thecontroller 302 allows the host to send a write command to write data toa closed zone. The controller 302 then switches the identified closedzone to the open and active state, and switches the least recently usedopen zone (e.g., the zone that has not received a write command in thelongest amount of time). Thus, the maximum number of concurrent zones inthe open and active state is not exceeded. The predetermined amount oftime and the maximum number of zones in the open and active state listedabove are not intended to be limiting, but to provide examples ofpossible embodiments.

Switching between an open state and a closed or resource conserved lowerperformance internal state for a zone requires ZNS, as discussed in FIG.2A-2B. The maximum number of open state and active zones of the NVM 306may equal the number of SRAM 308 temporary buffer locations. Thecontroller 302 may swap an active and open zone to a closed zone if awrite command is received that interrupts or has higher priority thanthe current write command associated with the open zone, or if thepredetermined amount of time has expired or passed.

Generally, as discussed further below, a command to write data to a zoneis received by the controller 302, the XOR engine 304 generates paritydata for the command in a temporary SRAM region 310 a-310 n.Simultaneously, if previous parity data for the zone exists in the DRAM312, the previous parity data is copied to a SRAM region 310 a-310 f(e.g., a non-temporary SRAM region where data may be stored long-term).Once the previous parity data is in a SRAM region 310 a-310 f, theprevious parity data is updated with the new parity data stored in thetemporary SRAM region 310 n−4-310 n. The updated parity data is thencopied from the SRAM 308 to a DRAM region 314 a-314 n.

The data transfer speed from a DRAM region 314 a-314 n to a SRAM region310 a-310 n may be slower than the XOR engine 304 write speed to thetemporary buffer of the SRAM 308, or vice-versa. The amount of time togenerate new parity data for a write command in the temporary bufferlocation of the SRAM 308, to copy the previous parity data from the DRAM312 to the SRAM 308, to update the previous parity data with the newparity data in the SRAM 308, and to switch a zone from the open andactive state to the closed or resource conserved lower performanceinternal state, as well as the amount of space in the temporary buffer,collectively determines the maximum number of open and active zones.Thus, the amount of time to generate new parity data for a write commandin the temporary buffer location of the SRAM 308, to copy the previousparity data from the DRAM 312 to the SRAM 308, and/or to update theprevious parity data with the new parity data in the SRAM 308 may berate matched to the amount of time it takes to switch a zone from theopen and active state to the or resource conserved lower performanceinternal closed state. In the embodiments herein, the temporary bufferis comprised of five SRAM regions 310 n−4-310 n and the maximum numberof open state and active zones is five zones.

As shown in FIG. 3A, new parity data for a second zone W02* and a fifthzone W05* was written to a second temporary SRAM region 310 n-3 and afifth temporary SRAM region 310 n, respectively, upon receiving one ormore commands to write data to the second and fifth zones. FIG. 3Afurther illustrates the updated parity or parity data for the secondzone W02′ being stored in both the SRAM 308 and the DRAM 312. In otherwords, the previous parity data for the second zone was updated with thenew parity data for the second zone W02* in the SRAM 308 and copied tothe DRAM 312 as updated second parity or parity data W02′. Upon updatingprevious parity data for a zone, the new parity data for the zone may beerased from the temporary SRAM region. Thus, updated parity or paritydata for a first zone W01′ is stored in a first SRAM region 310 a and inthe DRAM 312; however, the corresponding new parity data for the firstzone has been erased from the temporary SRAM regions (e.g., a firsttemporary SRAM region 310 n-4).

When a first write command to write data to a third zone is received bythe controller 302, the XOR engine 304 writes new parity data associatedwith the third zone W03* for the first write command to a thirdtemporary SRAM region 310 n-2, or the first temporary buffer locationavailable. The controller 302 simultaneously copies the previous paritydata for the third zone W03 from a DRAM region 314 c to an availableSRAM region 310 c, as shown by the arrow between 314 c and 310 c in FIG.3A.

When a second write command to write data to a fourth zone is receivedby the controller 302, the XOR engine 304 writes new parity dataassociated with the fourth zone W04* for the second write command to afourth SRAM region 310 n-1, or the first temporary buffer locationavailable. The controller 302 simultaneously copies the previous paritydata for the fourth zone W04 from a DRAM region 314 d to an availableSRAM region 310 d, as shown by the arrow between 314 d and 310 d in FIG.3A. Thus, as shown in FIG. 3A, the first through fifth zones arecurrently in the open and active state. The host may send as manycommands to write data to the first through fifth zones as the hostwants however quickly and in whatever order the host wants, as the firstthrough fifth zones are all currently in the open and active state.

In FIG. 3B, the previous parity data associated with the third zone W03is updated with the new parity associated with the third zone W03* toupdated third parity data W03′ in a third SRAM region 310 c. Uponupdating the previous parity data for the third zone W03′ with the newparity data for the first write command, the new parity data associatedwith the third zone W03* for the first command may be erased from thethird temporary SRAM region 310 n-2. Previous parity data for a zone maybe updated in any SRAM region 310 a-310 n.

The previous parity data associated with the fourth zone W04 is updatedwith the new parity associated with the fourth zone W04* to updatedfourth parity data W04′ in a fourth SRAM region 310 d. Upon updating theprevious parity data for the fourth zone W04′ with the new parity datafor the second write command, the new parity data associated with thefourth zone W04* for the second command may be erased from the fourthtemporary SRAM region 310 n-1, or the first temporary buffer locationavailable. Simultaneously, updated parity data associated with the fifthzone W05′ stored in a fifth SRAM region 310 e is copied to a fifth DRAMregion 314 e as fifth updated parity data W05′.

A third write command to write data to a closed sixth zone is thenreceived by the controller 302. Since the maximum number of open stateand active zones is currently met (i.e., the first through fifth zones),the controller 302 closes the first zone due to the first zone being theleast recently used zone, the third write command to write to a closedzone being received, and the predetermined amount of time expiring sincelast switching the state of a zone. Upon closing the first zone (i.e.,switching the first zone to a resource conserved lower performanceinternal state), the parity data associated with the first zone may beerased from the SRAM 308. The XOR engine 304 generates parity dataassociated with the sixth zone W06* for the third command and writes thegenerated parity data associated with the sixth zone W06* to a firsttemporary SRAM region 310 n-4, or the first temporary buffer locationavailable. If previous parity data associated with the sixth is storedin the DRAM 312, the previous parity data associated with the sixth zoneis then copied from the DRAM 312 to the SRAM 308.

A fourth write command to write data to a closed seventh zone isreceived by the controller 302 may be held in a buffer (not shown)within the controller 302 until a temporary SRAM region 310 n−4-310 n isavailable, if parity data stored in the temporary SRAM regions 310n−4-310 n has not yet been erased. The controller switches the leastrecently used zone, which is the second zone, from the open and activestate to the closed or resource conserved lower performance internalstate after the predetermined amount of time of about 0.5 seconds toabout 5 seconds has passed, and switches the seventh zone to the openand active state. Upon closing the second zone, the parity dataassociated with the second zone may be erased from the SRAM 308. Newparity data associated with the seventh zone W07* for the fourth commandis generated by the XOR engine 304 and is written to the secondtemporary SRAM region 310 n-3. If previous parity data associated withthe seventh zone is stored in the DRAM 312, the previous parity dataassociated with the seventh is then copied from the DRAM 312 to the SRAM308.

Thus, as shown in FIG. 3B, the third through seventh zones are currentlyin the open and active state. The host may send as many commands towrite data to the third through seventh zones as the host wants howeverquickly and in whatever order the host wants, as the third throughseventh zones are all currently in the open and active state.

In FIG. 3C, the updated parity data associated with the third zone W03′and the updated parity data associated with the fourth zone W04′ arecopied from the SRAM 308 to the DRAM 312. The previous parity dataassociated with the sixth zone W06 is updated with the corresponding newparity data W06* as updated sixth parity data W06′ in the first SRAMregion 310 a. Upon updating the previous parity data for the sixth zoneW06′ with the new parity data for the third write command, the newparity data associated with the sixth zone W06* for the third commandmay be erased from the first temporary SRAM region 310 n-4.

The previous parity data associated with the seventh zone W07 is updatedwith the corresponding new parity data W07* as updated seventh paritydata W07′ in the second SRAM region 310 b. Upon updating the previousparity data for the seventh zone W07′ with the new parity data for thefourth write command, the new parity data associated with the seventhzone W07* for the fourth command may be erased from the second temporarySRAM region 310 n-3. If previous parity data does not yet exist for thesixth or seventh zone or the sixth, the new parity data associated withthe sixth zone W06* or the new parity data associated with the seventhzone W07* may be moved to any non-temporary SRAM region (e.g., SRAMregions 310 a-310 f).

In FIG. 3D, a fifth write command to write data to the first zone isreceived by the controller 302. Since the first zone was previouslyswitched to the closed or resource conserved lower performance internalstate, the controller 302 switches the least recently used zone that iscurrently in the open and active state to the closed or resourceconserved lower performance internal state, which is the third zone,upon the predetermined amount of time passing since last switching thestate of a zone. The controller 302 then switches the first zone fromthe closed or resource conserved lower performance internal state to theopen and active state. The XOR engine 304 generates new parity dataassociated with the first zone W01* for the fifth write command andwrites the new parity data to the third SRAM region 310 n-2, or thefirst temporary buffer location available. Simultaneously, the previousparity data associated with the first zone WO1′ is copied from the DRAM312 to the third SRAM region 310 c.

A sixth write command to write data to the second zone is received bythe controller 302. Since the second zone was previously switched to theclosed or resource conserved lower performance internal state, thecontroller 302 switches the least recently used zone that is currentlyin the open and active state to the closed or resource conserved lowerperformance internal state, which is the fourth zone, upon thepredetermined amount of time passing since last switching the state of azone. The controller 302 then switches the second zone from the closedor resource conserved lower performance internal state to the open andactive state.

If the predetermined amount of time has not yet expired since switchingthe third zone to the closed or resource conserved lower performanceinternal state and switching the first zone to the open and activestate, the controller 302 will wait until the predetermine amount oftime has passed or expired before closing the fourth zone and re-openingthe second zone. The XOR engine 304 generates new parity data associatedwith the second zone W02* for the sixth command and writes the newparity data to the fourth temporary SRAM region 310 n-1, or the firsttemporary buffer location available. Simultaneously, the previous paritydata associated with the second zone W02′ is copied from the DRAM 312 tothe fourth SRAM region 310 d.

Thus, when a new write command is received to write data to a previouslyclosed zone, the controller 302 opens the zone so that the new writecommand can be written to the zone. However, if the maximum number ofopen and active zones has been reached, the controller 302 waits untilthe predetermined amount of time has passed before changing the leastrecently used zone to the closed or resource conserved lower performanceinternal state. After changing the least recently used zone to theclosed or resource conserved lower performance internal state, thecontroller 302 may then change the relevant zone to the open and activestate. The maximum number of open and active zones is selected tominimize any write delays, as copying data to and from the SRAM 308 tothe DRAM 312 takes time.

The updated parity data associated with the sixth zone W06′ is copied toan available DRAM region, such as a sixth DRAM region 314 f. The updatedparity data associated with the seventh zone W07′ is copied to anavailable DRAM region, such as DRAM region 314 n-4. Thus, as shown inFIG. 3D, the first, second, fifth, sixth, and seventh zones arecurrently in the open and active state. The host may send as manycommands to write data to the first, second, fifth, sixth, and seventhzones as the host wants however quickly and in whatever order the hostwants, as the first, second, fifth, sixth, and seventh zones are allcurrently in the open and active state.

FIG. 4 illustrates a schematic diagram 400 of updating data in flight,such as parity data, over time in the storage device, according to oneembodiment. The storage device of FIG. 4 may be the storage device 106of FIG. 1. Like in the above examples, parity data will be used as anexample of data in flight. The times used below are representative, andmay occur in a matter of seconds or minutes. A write command to a firstzone is illustrated as a horizontal striped block, a write command to asecond zone is illustrated as a vertical striped block, a write commandto a third zone is illustrated as a upward diagonal striped block, and awrite command to a fourth zone is illustrated as a downward diagonalstriped block. For example, a first write command 434 is to write datato a first zone, a second write command 442 is to write data to a secondzone, and a third write command 450 is to write data to a third zone.The fourth write command 450 a is to write data to a fourth zone and thefourth write command 450 b is to a first zone.

In the current embodiment, the controller includes three availablecontroller RAM or buffer regions 404 a, 404 b, 404 c for storing hostwrite commands and three available parity RAM or buffer regions 406 a,406 b, 406 c for storing parity data. The controller buffer regions 404a, 404 b, 404 c and the parity buffer regions 406 a, 406 b, 406 c may beany SRAM regions of 122 a-122 n of FIG. 1. The controller buffer regions404 a, 404 b, 404 c store data not yet written to the NVM. The storagedevice also includes four available RAM regions 408 a, 408 b, 408 c, 408d for parity data storage, in which each region corresponds to a zone,such that a first RAM region 408 a corresponds to a first zone, a secondRAM region 408 b corresponds to a second zone, a third RAM region 408 ccorresponds to a third zone, and a fourth RAM region 408 d correspondsto a fourth zone. The number of regions listed for each component aboveis not intended to be limiting, but to provide an example of a possibleembodiment.

At time 1, the controller receives a first host write command 402 towrite data to a first zone. The first host write command 402 is storedtemporarily in a first controller buffer region 404 a. Before or whilethe data of the first host write command 402 for the first zone iswritten to the NVM, the XOR engine 124 generates first parity data in aparity buffer region 406 a for the first host write command 402 for thefirst zone.

At time 2, the controller receives a second host write command 410 towrite data to a second zone. The second host write command 410 is storedtemporarily in a second controller buffer region 404 b. Before or whilethe data of the second host write command 410 for the second zone iswritten to the NVM, the XOR engine 124 generates second parity data in aparity buffer region 406 b for the second host write command 410 for thesecond zone.

At time 3, the controller receives a third host write command 418 towrite data to a third zone. The third host write command 418 is storedtemporarily in a third controller buffer region 404 c. Before or whilethe data of the third host write command 418 for the third zone iswritten to the NVM, the XOR engine 124 generates third parity data forthe third host write command 418 for the third zone in the parity bufferregion 406 c.

At time 4 a, the controller receives a fourth host write command 426 ato write data to a fourth zone. The data of the fourth host writecommand 426 a is written to the first controller buffer region 404 a.Throughout times 1-3, a previous write command, such as the first hostwrite command 402, stored in the first controller buffer region 404 ahas been successfully written to the NVM, and the data in the firstcontroller buffer region 404 a can be overwritten with the data of a newhost write command data, such as the fourth host write command 426 a.The first parity data for the first host write command 402 is thenwritten to the RAM region 408 a, and the XOR engine 124 generates fourthparity data for the fourth host write command 426 a in the parity bufferregion 406 a. If a fifth host write command is received to write data tothe first zone, the first parity data will be copied from the RAM region408 a back to a parity buffer region 406 a-406 c.

However, if the controller receives a fourth host write command to azone that has previously been written to, such as a fourth host writecommand 426 b to write data to the first zone, at time 4 b, the data ofthe fourth host write command 426 b is written to the first controllerbuffer region 404 a. Throughout times 1-3, the data previously stored inthe first controller buffer region 404 a (e.g., the first host writecommand 402) has been successfully written to the NVM. However, if thedata of the previous write command is still being written to the NVM,the fourth host write command 426 b is temporarily held in a controllerbuffer (e.g., a temporary SRAM region 310 n−4-310 n) until the transferto the NVM has completed. The XOR engine 124 then generates fourthparity data for the fourth host write command 426 b in the parity bufferregion 406 a. The parity buffer region 406 a thus includes both firstparity data for the first host write command 402 and fourth parity datafor the fourth host write command 426 b.

During time 4 b, since the parity buffer region 406 a is still storingthe first parity data for the first host write command 402 to the firstzone, the controller is able to update the parity data of the first zoneto include the parity data of the fourth host write command 426 bwithout delay, unlike during time 4 a. Moreover, by waiting until a nexthost write command is received before copying data from the paritybuffers to the RAM regions, data may be copied to and from the paritybuffer regions to the RAM regions fewer times. Since transferring datato and from the parity buffer regions to the RAM regions takes time,waiting to copy data from the parity buffer regions to the RAM regionsallows the storage device to operate in a quicker and more efficientmanner.

By setting a maximum number of open and active zones based on the amountof time it takes to copy the relevant data to and from a DRAM region toa SRAM region, write the parity data associated with a zone for thewrite command to a temporary buffer location in the SRAM, and update theprevious parity data associated with a zone, the efficiency of thememory device may be increased. The maximum number of open and activezones is selected to minimize any write delays, as the host may sendunlimited write commands to write data to open and active zones withoutdelay. Since SRAM is fast but more expensive, and DRAM is slower butcheaper, the DRAM and SRAM usages are both better optimized, reducingany DRAM access penalties.

Therefore, by basing the maximum number of open zones on one or more ofthe amount of time to generate new parity data for a write command in atemporary buffer location of the SRAM, the amount of time to copy theprevious parity data from the DRAM to the SRAM, the amount of time toupdate the previous parity data with the new parity data in the SRAM,the amount of time to switch a zone from the open and active state tothe closed or resource conserved lower performance internal state, andthe amount of space in the temporary buffer, the storage device canoperate in the quickest, smoothest, and most efficient manner.Furthermore, by restricting the host from opening new zones only afterthe predetermined amount of time has passed, the storage device hasenough time to copy data to and from the DRAM to the SRAM, furthereliminating delays for write commands.

In one embodiment, a storage device comprises a non-volatile storageunit, wherein the capacity of the non-volatile storage unit is dividedinto a plurality of zones. The non-volatile storage unit comprises aplurality of dies and each of the plurality of dies comprising aplurality of erase blocks. The storage device further comprises a firstvolatile memory unit and a controller coupled to the non-volatilestorage unit and the first volatile memory unit. The controllercomprises a second volatile memory unit, wherein the controller isconfigured to set a maximum number of open and active zones and receiveone or more first commands to write data to one or more open and activezones of the plurality of zones. The controller is further configured toreceive one or more second commands to write data to a first zone,wherein the first zone is in a closed or resource conserved lowerperformance internal state, change a least recently used open and activezone to the closed or resource conserved lower performance internalstate, and change the first zone to an open and active state.

The controller is further configured to determine which open and activezone was least recently used prior to changing the least recently usedopen and active zone to the closed or resource conserved lowerperformance internal state. The maximum number of open and active zonesis determined based on an amount of time it takes to change the leastrecently used zone to the closed or resource conserved lower performanceinternal state and to change the first zone to an open and active state.The controller is further configured to change the least recently usedzone to the closed or resource conserved lower performance internalstate and to change the first zone to an open and active state after apredetermined amount of time has expired. The second volatile memory isa SRAM unit and the first volatile memory is a DRAM unit, and whereinthe SRAM unit comprises one or more temporary locations for generatingnew parity data for the one or more first commands received and the oneor more second commands received. The maximum number of open and activezones is determined based on a number of temporary locations in the SRAMunit. The controller is further configured to generate new first paritydata for the first zone in a first temporary location in the SRAM unit,copy previous first parity data for the first open and active zone fromthe DRAM unit to a first location in the SRAM unit while generating thenew first parity data, update the previous first parity data with thenew first parity data in the SRAM unit, and copy the updated firstparity data from the SRAM unit to the DRAM unit when a controller bufferarea of the SRAM unit is filled to capacity, the controller buffer areatemporarily storing data to be written to the non-volatile storage unit.The maximum number of open and active zones is further determined basedon an amount of time the generating the new first parity data, copyingthe previous first parity data, and updating the previous first paritydata takes.

In another embodiment, a storage device comprises a non-volatile storageunit, wherein the capacity of the non-volatile storage unit is dividedinto a plurality of zones. The non-volatile storage unit comprises aplurality of dies and each of the plurality of dies comprising aplurality of erase blocks. The storage device further comprises a firstvolatile memory unit and a controller coupled to the non-volatilestorage unit and the first volatile memory unit. The controllercomprises a second volatile memory unit, wherein the controller isconfigured to set a maximum number of open and active zones, receive oneor more commands to write data to one or more open and active zones ofthe plurality of zones, and generate new first parity data for a firstopen and active zone in a temporary location of one or more temporarylocations in the second volatile memory unit. The controller is furtherconfigured to copy previous first parity data for the first open andactive zone from the first volatile memory unit to a first location inthe second volatile memory unit. The controller is also configured toupdate the previous first parity data with the new first parity data inthe second volatile memory unit, wherein an amount of time thegenerating the new first parity data, copying the previous first paritydata, and updating the previous first parity data takes determines themaximum number of open and active zones.

The controller is further configured to determine the first open andactive zone is a least recently used zone of the open and active zonesupon receiving one or more second commands to write data to a secondzone, the second zone being in a closed or resource conserved lowerperformance internal state, change the first open and active zone to theclosed or resource conserved lower performance internal state, andchange the second zone to an open and active state. The maximum numberof open and active zones is determined based on an amount of time ittakes to change the first zone to the closed or resource conserved lowerperformance internal state and to change the second zone to an open andactive state. The controller is further configured to change the leastrecently used zone to the closed or resource conserved lower performanceinternal state only after a predetermined amount of time has expired.The controller comprises one or more controller buffer regions, and theone or more commands received to write data to the one or more open andactive zones of the plurality of zones fill the one or more controllerbuffer regions to capacity. The maximum number of open and active zonesis determined based on a number of temporary locations in the secondvolatile memory unit. The second volatile memory is a SRAM unit and thefirst volatile memory is a DRAM unit.

In another embodiment, a storage device comprises a non-volatile storageunit, wherein the capacity of the non-volatile storage unit is dividedinto a plurality of zones. The non-volatile storage unit comprises aplurality of dies and each of the plurality of dies comprising aplurality of erase blocks. The storage device further comprises a firstvolatile memory unit and a controller coupled to the non-volatilestorage unit and the first volatile memory unit. The controllercomprises a second volatile memory unit, wherein the second volatilememory comprises one or more temporary locations. The controller isconfigured to set a maximum number of open and active zones, wherein themaximum number of open and active zones is determined based on a numberof temporary locations in the second volatile memory and receive one ormore first commands to write data to one or more open and active zonesof the plurality of zones. The controller is further configured togenerate new first parity data for a first open and active zone in afirst temporary location in the second volatile memory unit, change asecond open and active zone to a closed or resource conserved lowerperformance internal state upon receiving one or more second commands towrite data to a closed zone, and change the closed zone to an open andactive state.

The controller is further configured to copy previous first parity datafor the first open and active zone from the first volatile memory unitto a first location in the second volatile memory unit while generatingthe new first parity data. The controller is also configured to updatethe previous first parity data with the new first parity data in thesecond volatile memory unit. The maximum number of open and active zonesis further determined based on an amount of time the generating the newfirst parity data, copying the previous first parity data, and updatingthe previous first parity data takes, and an amount of time it takes tochange the second open and active zone to the closed or resourceconserved lower performance internal state and to change the closed zoneto an open and active state. The controller is further configured todetermine that the second open and active zone is the open and activezone that was least recently used. The controller is further configuredto change an open and active zone to the closed or resource conservedlower performance internal state after a predetermined amount of timehas expired, wherein the predetermined amount of time is about 0.5seconds to about 5 seconds, and wherein the maximum number of open andactive zones is further determined based on the predetermined amount oftime.

While the foregoing is directed to embodiments of the presentdisclosure, other and further embodiments of the disclosure may bedevised without departing from the basic scope thereof, and the scopethereof is determined by the claims that follow.

What is claimed is:
 1. A storage device, comprising: a non-volatilestorage unit, wherein a capacity of the non-volatile storage unit isdivided into a plurality of zones, and wherein the non-volatile storageunit comprises a plurality of dies, each of the plurality of diescomprising a plurality of erase blocks; a first volatile memory unit;and a controller coupled to the non-volatile storage unit and the firstvolatile memory unit, the controller comprising a second volatile memoryunit, wherein the controller is configured to: set a maximum number ofopen and active zones; receive one or more first commands to write datato one or more open and active zones of the plurality of zones; receiveone or more second commands to write data to a first zone, wherein thefirst zone is in a closed or resource conserved lower performanceinternal state; change a least recently used open and active zone to theclosed or resource conserved lower performance internal state; andchange the first zone to an open and active state.
 2. The storage deviceof claim 1, wherein the controller is further configured to determinewhich open and active zone was least recently used prior to changing theleast recently used open and active zone to the closed or resourceconserved lower performance internal state.
 3. The storage device ofclaim 1, wherein the maximum number of open and active zones isdetermined based on an amount of time it takes to change the leastrecently used zone to the closed or resource conserved lower performanceinternal state and to change the first zone to an open and active state.4. The storage device of claim 1, wherein the controller is furtherconfigured to change the least recently used zone to the closed orresource conserved lower performance internal state and to change thefirst zone to an open and active state after a predetermined amount oftime has expired.
 5. The storage device of claim 1, wherein the secondvolatile memory is a SRAM unit and the first volatile memory is a DRAMunit, and wherein the SRAM unit comprises one or more temporarylocations for generating new parity data for the one or more firstcommands received and the one or more second commands received.
 6. Thestorage device of claim 5, wherein the maximum number of open and activezones is determined based on a number of temporary locations in the SRAMunit.
 7. The storage device of claim 6, wherein the controller isfurther configured to: generate new first parity data for the first zonein a first temporary location in the SRAM unit; copy previous firstparity data for the first open and active zone from the DRAM unit to afirst location in the SRAM unit while generating the new first paritydata; update the previous first parity data with the new first paritydata in the SRAM unit; and copy the updated first parity data from theSRAM unit to the DRAM unit when a controller buffer area of the SRAMunit is filled to capacity, the controller buffer area temporarilystoring data to be written to the non-volatile storage unit.
 8. Thestorage device of claim 7, wherein the maximum number of open and activezones is further determined based on an amount of time the generatingthe new first parity data, copying the previous first parity data, andupdating the previous first parity data takes.
 9. A storage device,comprising: a non-volatile storage unit, wherein a capacity of thenon-volatile storage unit is divided into a plurality of zones, andwherein the non-volatile storage unit comprises a plurality of dies,each of the plurality of dies comprising a plurality of erase blocks; afirst volatile memory unit; and a controller coupled to the non-volatilestorage unit and the first volatile memory unit, the controllercomprising a second volatile memory unit, wherein the controller isconfigured to: set a maximum number of open and active zones; receiveone or more commands to write data to one or more open and active zonesof the plurality of zones; generate new first parity data for a firstopen and active zone in a temporary location of one or more temporarylocations in the second volatile memory unit; copy previous first paritydata for the first open and active zone from the first volatile memoryunit to a first location in the second volatile memory unit; and updatethe previous first parity data with the new first parity data in thesecond volatile memory unit, wherein an amount of time the generatingthe new first parity data, copying the previous first parity data, andupdating the previous first parity data takes determines the maximumnumber of open and active zones.
 10. The storage device of claim 9,wherein the controller is further configured to: determine the firstopen and active zone is a least recently used zone of the open andactive zones upon receiving one or more second commands to write data toa second zone, the second zone being in a closed or resource conservedlower performance internal state; change the first open and active zoneto the closed or resource conserved lower performance internal state;and change the second zone to an open and active state.
 11. The storagedevice of claim 10, wherein the maximum number of open and active zonesis determined based on an amount of time it takes to change the firstzone to the closed or resource conserved lower performance internalstate and to change the second zone to an open and active state.
 12. Thestorage device of claim 10, wherein the controller is further configuredto change the least recently used zone to the closed or resourceconserved lower performance internal state only after a predeterminedamount of time has expired.
 13. The storage device of claim 10, whereinthe controller comprises one or more controller buffer regions, andwherein the one or more commands received to write data to the one ormore open and active zones of the plurality of zones fill the one ormore controller buffer regions to capacity.
 14. The storage device ofclaim 9, wherein the maximum number of open and active zones isdetermined based on a number of temporary locations in the secondvolatile memory unit.
 15. The storage device of claim 9, wherein thesecond volatile memory is a SRAM unit and the first volatile memory is aDRAM unit.
 16. A storage device, comprising: a non-volatile storageunit, wherein a capacity of the non-volatile storage unit is dividedinto a plurality of zones, and wherein the non-volatile storage unitcomprises a plurality of dies, each of the plurality of dies comprisinga plurality of erase blocks; a first volatile memory unit; and acontroller coupled to the non-volatile storage unit and the firstvolatile memory unit, the controller comprising a second volatile memoryunit, the second volatile memory comprising one or more temporarylocations, wherein the controller is configured to: set a maximum numberof open and active zones, wherein the maximum number of open and activezones is determined based on a number of temporary locations in thesecond volatile memory; receive one or more first commands to write datato one or more open and active zones of the plurality of zones; generatenew first parity data for a first open and active zone in a firsttemporary location in the second volatile memory unit; change a secondopen and active zone to a closed or resource conserved lower performanceinternal state upon receiving one or more second commands to write datato a closed zone; and change the closed zone to an open and activestate.
 17. The storage device of claim 16, wherein the controller isfurther configured to: copy previous first parity data for the firstopen and active zone from the first volatile memory unit to a firstlocation in the second volatile memory unit while generating the newfirst parity data; and update the previous first parity data with thenew first parity data in the second volatile memory unit.
 18. Thestorage device of claim 17, wherein the maximum number of open andactive zones is further determined based on an amount of time thegenerating the new first parity data, copying the previous first paritydata, and updating the previous first parity data takes, and an amountof time it takes to change the second open and active zone to the closedor resource conserved lower performance internal state and to change theclosed zone to an open and active state.
 19. The storage device of claim16, wherein the controller is further configured to determine that thesecond open and active zone is the open and active zone that was leastrecently used.
 20. The storage device of claim 16, wherein thecontroller is further configured to change an open and active zone tothe closed or resource conserved lower performance internal state aftera predetermined amount of time has expired, wherein the predeterminedamount of time is about 0.5 seconds to about 5 seconds, and wherein themaximum number of open and active zones is further determined based onthe predetermined amount of time.